<template>
  <div>
    <el-card class="box-card">
      <div slot="header">
        <span>demo</span>
      </div>
      <ul>
        <li v-for="item in list" :key="item.id">{{item.name}}</li>
      </ul>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: []
    }
  },

  created() {
    this.getList();
  },

  methods: {
    async getList() {
      try {
        let res = await this.$axios.get('/type/list');
        this.list = res.result;
      } catch (error) {
        // todo
      }
    }
  }
};
</script>

<style>
</style>